package cn.edu.lcu.cs.javafxdemo;

import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.*;
import javafx.scene.input.DragEvent;
import javafx.scene.shape.Ellipse;

public class HelloController {
    public Button bnt2;
    @FXML
    private Label welcomeText;

    @FXML
    private Button alertBtn;

    @FXML
    private Ellipse ellipse;

    @FXML
    private CheckBox gender;

    @FXML
    private TextField usernameField;

    @FXML
    void onAlertBtn(ActionEvent event) {
        Alert alert = new Alert(Alert.AlertType.WARNING);
        alert.setContentText("上课说话，警告一次！");
        alert.show();
    }


    @FXML
    protected void onHelloButtonClick() {
        welcomeText.setText("Welcome to JavaFX Application!");
    }

    @FXML
    protected void onCancelButtonClick() {

    }

    @FXML
    void onHelloButtonClick(ActionEvent event) {

    }

    @FXML
    void onXXXXX(DragEvent event) {

    }

    public void onBtn2(ActionEvent actionEvent) {
    }

    public void onInformation(ActionEvent actionEvent) {
        System.out.println(actionEvent.toString());
    }
}